package com.lingyue.commons.enums;

/**
 * Created by IntelliJ IDEA.
 *
 * @Description: TODO
 * @Author: BaiJinhua
 * @Date: 2020/1/3 17:32
 * @See: com.lingyue.commons.enums
 * @Version: 1.0
 * Copyright: Copyright (c) 2020
 */
public enum DatasourceEnum implements CommEnum<String>{
    NSP("NSP","NSP导入"),
    BATCH("BATCH","批次导入"),
    ASSISTANT("ASSISTANT","自定义添加"),

    CREATE("C","新增标识"),
    UPDATE("U","更新标识"),
    DELETE_DEFAULT("D","删除标识|新增线索"),

    //线索标识
    EXPIRED("E","过期线索"),
    GO_HIS_SHOP("1","去他店"),
    GO_OUR_SHOP("2","回本店")
    ;
    DatasourceEnum(String code,String content){
        this.code = code;
        this.content = content;
    }
    private String code;
    private String content;

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getContent() {
        return this.content;
    }

    public static DatasourceEnum getByCode(String code) {
        for (DatasourceEnum item : values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}
